package com.retlife.tvshow.global

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.retlife.tvshow.ui.MainActivity

class BootBroadcastReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        if ("android.intent.action.BOOT_COMPLETED" == intent!!.action) {
            val intentLauncher = Intent(context, MainActivity::class.java)
            intentLauncher.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            context!!.startActivity(intentLauncher)
        }
    }
}